import { getAction, postAction } from '@/api/baseAPI'

/** 文章分类 */
// 查询文章分类树
export const apiQueryArticleVarietyTree = params => getAction('/back/article-variety/tree', params)
// 保存文章分类信息
export const apiSaveArticleVariety = params => postAction('/back/article-variety/save', params)
// 更新文章分类信息
export const apiUpdateArticleVariety = id => postAction('/back/article-variety/update/' + id)
// 删除文章分类信息
export const apiDelArticleVariety = id => getAction('/back/article-variety/del/' + id)

/** 文章信息 */
// 分页查询文章信息
export const apiQueryArticleList = params => getAction('/back/article/page', params)
// 新增文章信息
export const apiSaveArticle = params => postAction('/back/article/save', params)
// 按id查询文章信息
export const apiQueryArticleById = id => getAction('/back/article/' + id)

/** 案例管理 */
// 分页查询案例信息
export const apiQueryCaseInfoList = params => getAction('/back/case-info/page', params)
// 新增案例信息
export const apiSaveCaseInfo = params => postAction('/back/case-info/save', params)
// 更新案例信息
export const apiUpdateCaseInfo = (id, params) => postAction('/back/case-info/update/' + id, params)
// 上架案例信息
export const apiEnableCaseInfo = id => postAction('/back/case-info/enable/' + id)
// 下架案例信息
export const apiDisableCaseInfo = id => postAction('/back/case-info/disable/' + id)
// 按id查询案例信息
export const apiQueryCaseInfoById = id => getAction('/back/case-info/' + id)
